#include <iostm8s103f3.h>

static void delay(unsigned long nCount)
{
  while (nCount != 0) {
    nCount--;
  }
}

int main( void )
{
  CLK_CKDIVR &= (unsigned char)(~0x18);  // 16MHz high speed internal clock
  
  //LED: B5
  PB_DDR |= 0x20;  // output
  PB_CR1 |= 0x20;  // push pull
  PB_CR2 |= 0x20;  // 10MHz output speed
  
  while(1) {
    PB_ODR &= 0xDF;  // LOW is ON
    delay(0xffff);
    PB_ODR |= 0x20;  // HIGH if OFF
    delay(0xffff);
  }
}
